<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mytable/jrtable/yg_custom_bom.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mytable/jrtable/yg_custom_bom.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'yg_custom_bom_id',
                footer: "Foots",
                cnName: '自定义表-生成亿格客户BOM',
                name: 'jrtable/yg_custom_bom',
                url: "/yg_custom_bom/",
                sortName: "XIANGM"
            });
            const editFormFields = ref({"XIANGM":"","KEHWL":"","HANGH":"","WULIAO":"","SHUL":"","GONGW":""});
            const editFormOptions = ref([[{"title":"选项号","field":"XIANGM"},
                               {"title":"物料号","field":"KEHWL"}],
                              [{"title":"行号","field":"HANGH"},
                               {"title":"子物料号","field":"WULIAO"}],
                              [{"title":"数量","field":"SHUL","type":"decimal"},
                               {"title":"工位","field":"GONGW"}]]);
            const searchFormFields = ref({"XIANGM":"","KEHWL":"","WULIAO":""});
            const searchFormOptions = ref([[{"title":"选项号","field":"XIANGM"},{"title":"物料号","field":"KEHWL","type":"like"}],[{"title":"子物料号","field":"WULIAO","type":"like"}]]);
            const columns = ref([{field:'yg_custom_bom_id',title:'自定义表-生成亿格客户BOM',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'XIANGM',title:'选项号',type:'string',link:true,width:220,align:'left',sort:true},
                       {field:'KEHWL',title:'物料号',type:'string',width:220,align:'left'},
                       {field:'HANGH',title:'行号',type:'string',width:220,align:'left'},
                       {field:'WULIAO',title:'子物料号',type:'string',width:220,align:'left'},
                       {field:'SHUL',title:'数量',type:'decimal',width:110,align:'left'},
                       {field:'GONGW',title:'工位',type:'string',width:220,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
